﻿@using DocProcessingWorkflow.Resources.Password
@model DocProcessingWorkflow.Models.Password.ChangeCurrentPasswordModel

@{
    ViewBag.Title = "ChangeCurrent";
    Layout = "~/Views/Session/_Layout.cshtml";
}

@using (Html.BeginForm("ChangeCurrent", "Password", FormMethod.Post))
{
    @Html.AntiForgeryToken()
    <div class="row">
        <div class="col-md-4 col-md-offset-4 loginform">
            @Html.HiddenFor(m => m.UserId)
            @Html.HiddenFor(m => m.UserName)
            @Html.HiddenFor(m => m.FirstName)
            @Html.HiddenFor(m => m.LastName)
            
            @Html.Hidden("lastLoginDate", ViewBag.LastLoginDate==null?"newUser":"existingUser")

            <div class="form-group">
                @Html.LabelFor(m => m.CurrentPassword, Change.CurrentPassword)
                @Html.PasswordFor(m => m.CurrentPassword, new { @class = "form-control" })
            </div>
            <div class="form-group" id="pwd-container">
                @Html.LabelFor(m => m.NewPassword, Change.Password) <a class="help glyphicon glyphicon-question-sign" id="PasswordHelp"></a>
                @Html.PasswordFor(m => m.NewPassword, new { @class = "form-control passwordstrength" })
                <div class="pwstrength_viewport_progress"></div>

            </div>
            <div class="form-group">
                @Html.LabelFor(m => m.ConfirmNewPassword, Change.ConfirmPassword)
                @Html.PasswordFor(m => m.ConfirmNewPassword, new { @class = "form-control" })
            </div>
            <p class="text-center">
                <input type="submit" class="btn btn-login" value="Submit" />
            </p>
            <div id="Message" class="alert alert-danger alert-dismissable">
                @Html.ValidationMessageFor(m => m.CurrentPassword)<br />
                @Html.ValidationMessageFor(m => m.NewPassword)<br />
                @Html.ValidationMessageFor(m => m.ConfirmNewPassword)
            </div>
        </div>
    </div>
    @Html.Partial("_PasswordResetModel")
}

<div id="password-popover">
    @Html.Partial("_PasswordComplexity")
</div>




@section Scripts {
    <script src="@Url.Content("~/Scripts/User/user.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/Password/password.js")" type="text/javascript"></script>
}

